import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';
@Entity()
export class Content {
  @PrimaryGeneratedColumn({ comment: `主键id` })
  id: number;
  @Column({ comment: `标题`, charset: `utf-8` })
  title: string;
  @Column({ comment: `作者`, charset: `utf-8` })
  author: string;
  @Column({ comment: `简介`, charset: `utf-8` })
  description: string;
  @Column({ comment: `内容文件地址`, nullable: true, charset: `utf-8` })
  fileUrl: string;
  @Column({ comment: `头图地址`, charset: `utf-8` })
  imgUrl: string;
  @Column({ comment: `外部链接`, nullable: true, charset: `utf-8` })
  demoUrl: string;
  @Column({ comment: `标签`, charset: `utf-8` })
  tag: string;
  @Column({ comment: `分类类别`, charset: `utf-8` })
  classify: string;
  @Column({ comment: `创建时间`, type: 'bigint' })
  createTime: number;
}
